<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>动态绑定内联样式——三目运算符语法</title>
</head>
<body>
<div id="app">
  <h1 v-bind:style="{backgroundColor: status? 'red' : 'green'}">Hello, Vue!</h1>
</div>

<script type="module">
    import {createApp, ref} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup(){
              let status = ref(true)
                return {
                status
                }
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>